<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/custom.css"/>
	<style>
	</style>
</head>
<body style="background:url('../image/background.jpg') no-repeat;background-size:cover;">
  <section class="aui-text-center aui-margin-b-15 aui-margin-t-15">
    <img class="perW50" style="margin:0 auto;" src="../image/badges.png" alt="">
  </section>
  <section class="aui-text-center aui-margin-b-15 aui-margin-t-15">
    <p id="text" style="color:white;font-size:2em;opacity:0">欢迎使用警务通</p>
  </section>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function(){
      // var t = setTimeout(welcome(), 1000);
      // var timer = 0;
      // function welcome(){
      //   var text = $api.byId('text');
      //   text.opacity = timer/5;
      //   t = setTimeout(welcome(),1000);
      //   timer<5?timer++:clearTimeout(t);
      // }
    };
    var t = setTimeout("welcome()", 10);
    var timer = 0;
    function welcome(){
      var text = document.getElementById('text');
      text.style.opacity = timer/300;
      t = setTimeout("welcome()",10);
      if(timer<300){
        timer++;
      }else {
        clearTimeout(t);
        api.showProgress({
            style: 'default',
            animationType: 'fade',
            title: '努力加载中...',
            text: '先喝杯茶...',
            modal: false
        });
        location.href='login_win.html';
        api.hideProgress();
      }
    }
</script>
</html>
